local beiluan = fk.CreateSkill{
    name = "jin_heg__beiluan",
}

Fk:loadTranslationTable{
    ["jin_heg__beiluan"] = "备乱",
    [":jin_heg__beiluan"] = "当你受到伤害后，你可令伤害来源不为装备牌的手牌均视为【杀】直至此回合结束。",
    ["@@jin_heg__beiluan_viewAsSlash-turn"] = "备乱",

    ["$jin_heg__beiluan1"] = "秣马厉兵，筹伐不臣！",
    ["$jin_heg__beiluan2"] = "枕戈待旦，秣马征平。",
}

beiluan:addEffect(fk.Damaged,{
    anim_type = "defensive",
    can_trigger = function (self, event, target, player, data)
        return target == player and player:hasSkill(beiluan.name) and not data.from.dead
      end,
    on_use = function (self, event, target, player, data)
        player.room:setPlayerMark(data.from, "@@jin_heg__beiluan_viewAsSlash-turn", 1)
      end,
})

beiluan:addEffect("filter",{
    mute = true,
    card_filter = function (self, card, player)
        return table.contains(player:getCardIds("h"), card.id) and card.type ~= Card.TypeEquip and player:getMark("@@jin_heg__beiluan_viewAsSlash-turn") > 0
      end,
    view_as = function (self, player, card)
        local c = Fk:cloneCard("slash", card.suit, card.number)
        c.skillName = "jin_heg__beiluan"
        return c
     end
})

return beiluan